import { uniRequest, uniRequestNoLoading, base_url } from '../utils/request';

const host = base_url

// 公用
const qiniuToken = (params) => uniRequestNoLoading(params, host + '/api/common/upload/token');
const versionCheck = (params) => uniRequest(params, host + '/api/frontend/config/versionCheck');
const updateApp = (params) => uniRequest(params, host + '/api/frontend/global/updateApp');
//用户信息
const register = (params) => uniRequest(params, host + '/api/frontend/register');  //用户注册
const send_code_sms = (params) => uniRequest(params, host + '/api/frontend/register/send_code_sms');  //发送注册验证码
const graphicalcode = (params) => uniRequest(params, host + '/api/common/verify/code');  //发送图形验证码




const login = (params) => uniRequest(params, host + '/api/frontend/login');  //用户登录
const info = (params) => uniRequest(params, host + '/api/frontend/user/info');  //用户信息
const changePhone = (params) => uniRequest(params, host + '/api/frontend/user/changePhone');  //更换手机号
const certification = (params) => uniRequest(params, host + '/api/frontend/user/certification');  //实名认证
const changePassword = (params) => uniRequest(params, host + '/api/frontend/user/changePassword');  //修改密码
const sendCodeSms = (params) => uniRequest(params, host + '/api/frontend/user/sendCodeSms');  //发送验证码
const changeOperationPassword = (params) => uniRequest(params, host + '/api/frontend/user/changeOperationPassword');  //修改交易密码
const store = (params) => uniRequest(params, host + '/api/frontend/user/store');  //修改资料

const forgetPassword = (params) => uniRequest(params, host + '/api/frontend/user/forgetPassword');  //忘记密码

const products = (params) => uniRequest(params, host + '/api/frontend/user/products');  //用户产品
const getabout = (params) => uniRequest(params, host + '/api/frontend/settings/get');  //获取系统配置
const invitationCode = (params) => uniRequest(params, host + '/api/frontend/user/invitationCode');  //生成邀请码

const base64 = (params) => uniRequest(params, host + '/api/common/qrcode/base64');  //生成二维码
const invitationList = (params) => uniRequest(params, host + '/api/frontend/user/invitationLog');  //邀请列表
const invitationRanking = (params) => uniRequest(params, host + '/api/frontend/user/invitationRanking');  //邀请排行

const CollectLog = (params) => uniRequest(params, host + '/api/frontend/user/productCollectLog');  //商品收藏

const feedback = (params) => uniRequest(params, host + '/api/frontend/feedback');  //用户反馈

const userOrders = (params) => uniRequest(params, host + '/api/frontend/user/orders'); //用户订单
const userOrderDetail = (params) => uniRequest(params, host + '/api/frontend/user/orderDetail'); //订单详情
const userProductDetail = (params) => uniRequest(params, host + '/api/frontend/user/productDetail'); //用户产品详情
const passOn = (params) => uniRequest(params, host + '/api/frontend/user/passOn'); //转增

const openBlindBox = (params) => uniRequest(params, host + '/api/frontend/user/openBlindBox'); //开启盲盒
const passOnLog = (params) => uniRequest(params, host + '/api/frontend/user/passOnLog'); //开启盲盒

const stackingProducts = (params) => uniRequest(params, host + '/api/frontend/user/stackingProducts'); //堆叠样式用户藏品











// 商城
const productList = (params) => uniRequest(params, host + '/api/frontend/product/list'); //商城列表
const productDetail = (params) => uniRequest(params, host + '/api/frontend/product/detail'); //产品详情
const productCreateOrder = (params) => uniRequest(params, host + '/api/frontend/product/createOrder'); //创建订单
const productCollect = (params) => uniRequest(params, host + '/api/frontend/product/collect'); //收藏
const reservedApply = (params) => uniRequest(params, host + '/api/frontend/product/reservedApply'); //预约

const banners = (params) => uniRequest(params, host + '/api/frontend/banners'); //支付
const queueDetail = (params) => uniRequest(params, host + '/api/frontend/product/queueDetail'); //排队详情
const updateHeartbeatAt = (params) => uniRequest(params, host + '/api/frontend/product/updateHeartbeatAt'); //更新排队心跳
const cancelOrder = (params) => uniRequest(params, host + '/api/frontend/user/cancelOrder'); //取消订单

const mergeLogs = (params) => uniRequest(params, host + '/api/frontend/product/mergeLogs'); //合成日志

const merge = (params) => uniRequest(params, host + '/api/frontend/product/merge'); //合成日志

const circulationInfo = (params) => uniRequest(params, host + '/api/frontend/user/circulationInfo'); //流转信息





// 汇元支付
const hy_bankSignPage = (params) => uniRequest(params, host + '/api/frontend/heePay/bankSignPage'); //签约
const hy_confirmPay = (params) => uniRequest(params, host + '/api/frontend/heePay/confirmPay'); //确认支付
const hy_cancelAuth = (params) => uniRequest(params, host + '/api/frontend/heePay/cancelAuth'); //确认支付








const pay = (params) => uniRequest(params, host + '/api/frontend/pay'); //获取轮播图
const openPayType = (params) => uniRequest(params, host + '/api/frontend/openPayType');

const get = (params) => uniRequest(params, host + '/api/frontend/settings/get'); //获取系统配置


//资讯
const zixunlist = (params) => uniRequest(params, host + '/api/frontend/information/list'); //获取系统配置
const zixundetails = (params) => uniRequest(params, host + '/api/frontend/information/details'); //资讯详情


const applyBindCard = (params) => uniRequest(params, host + '/api/frontend/user/applyBindCard'); //用户绑定银行卡

const unBindCard = (params) => uniRequest(params, host + '/api/frontend/user/unBindCard'); //用户解绑银行卡

const confirmBindCard = (params) => uniRequest(params, host + '/api/frontend/user/confirmBindCard'); //用户确认绑定银行卡

const bankCardList = (params) => uniRequest(params, host + '/api/frontend/user/bankCardList'); //用户银行卡列表

const jdConfirmPay = (params) => uniRequest(params, host + '/api/frontend/jdConfirmPay'); //京东确认支付


//二级市场

const release = (params) => uniRequest(params, host + '/api/frontend/consignment/release'); //发布商品

const goodsList = (params) => uniRequest(params, host + '/api/frontend/consignment/goodsList'); //堆叠藏品组列表

const myReleaseList = (params) => uniRequest(params, host + '/api/frontend/consignment/myReleaseList'); //我卖出的列表

const myBoughtList = (params) => uniRequest(params, host + '/api/frontend/consignment/myBoughtList'); //买家已创建订单列表

const boughtDetail = (params) => uniRequest(params, host + '/api/frontend/consignment/boughtDetail'); //买家订单详情

const createOrder = (params) => uniRequest(params, host + '/api/frontend/consignment/createOrder'); //创建订单

const cashOutRecords = (params) => uniRequest(params, host + '/api/frontend/consignment/cashOutRecords'); //提现记录

const incomeDetails = (params) => uniRequest(params, host + '/api/frontend/consignment/incomeDetails'); //收入明细

const userWallet = (params) => uniRequest(params, host + '/api/frontend/consignment/userWallet'); //钱包展示

const releaseDetail = (params) => uniRequest(params, host + '/api/frontend/consignment/releaseDetail'); //卖家单品状态详情

const buyList = (params) => uniRequest(params, host + '/api/frontend/consignment/buyList'); //单个藏品组购买列表

const unrelease = (params) => uniRequest(params, host + '/api/frontend/consignment/unrelease'); //卖家下架商品

const addPayment = (params) => uniRequest(params, host + '/api/frontend/consignment/addPayment'); //添加收款方式
const delPayment = (params) => uniRequest(params, host + '/api/frontend/consignment/delPayment'); //添加收款方式

const withdrawal = (params) => uniRequest(params, host + '/api/frontend/consignment/withdrawal'); //提现添加记录

const setPayment = (params) => uniRequest(params, host + '/api/frontend/consignment/setPayment'); //修改默认收款方式

const getCommissionMoney = (params) => uniRequest(params, host + '/api/frontend/consignment/getCommissionMoney'); //获取手续费比例

const getRule = (params) => uniRequest(params, host + '/api/frontend/consignment/getRule'); //提现说明

const createRechargeOrder = (params) => uniRequest(params, host + '/api/frontend/consignment/createRechargeOrder'); //充值创建订单



// 挂售商家
const linkedMerchantList = (params) => uniRequest(params, host + '/api/frontend/linkedMerchant/list'); //列表
const linkedMerchantDetail = (params) => uniRequest(params, host + '/api/frontend/linkedMerchant/detail'); //详情
const linkedMerchantApply = (params) => uniRequest(params, host + '/api/frontend/linkedMerchant/apply'); //申请
const userMerchantDetail = (params) => uniRequest(params, host + '/api/frontend/linkedMerchant/userMerchantDetail'); //用户挂售商家详情
const userMerchantStore = (params) => uniRequest(params, host + '/api/frontend/linkedMerchant/userMerchantStore'); //用户挂售商家修改
const consignmentList = (params) => uniRequest(params, host + '/api/frontend/linkedMerchant/consignmentList'); //绑定的寄售商品列表

const tokenUrl = (params) => uniRequest(params, host + '/api/frontend/sync/tokenUrl');
const cooperateApplyCommit = (params) => uniRequest(params, host + '/api/frontend/cooperateApply/commit');
const category = (params) => uniRequest(params, host + '/api/frontend/product/category'); //产品分类列表

// 积分
const pointLog = (params) => uniRequest(params, host + '/api/frontend/user/pointLog'); //用户积分日志
const pointToPointMarket = (params) => uniRequest(params, host + '/api/frontend/user/pointToPointMarket'); //转账到积分商城

// 钱包转账
const walletTransfer = (params) => uniRequest(params, host + '/api/frontend/consignment/walletTransfer'); //用户积分日志

// 甄猫
const zm_wallet = (params) => uniRequest(params, host + '/api/frontend/zm/wallet'); //可兑换商品列表
const exchange = (params) => uniRequest(params, host + '/api/frontend/zm/exchange'); //积分兑换产品
const exchangeLog = (params) => uniRequest(params, host + '/api/frontend/zm/exchangeLog'); //兑换记录

// 委托
const entrust_list = (params) => uniRequest(params, host + '/api/frontend/entrust/list'); //委托列表
const entrust_commit = (params) => uniRequest(params, host + '/api/frontend/entrust/commit'); //发起委托
const entrust_userEntrustLog = (params) => uniRequest(params, host + '/api/frontend/entrust/userEntrustLog'); //我的委托
const entrust_cancel = (params) => uniRequest(params, host + '/api/frontend/entrust/cancel'); //撤销委托

// 杉德收银台
const getWalletUrl = (params) => uniRequest(params, host + '/api/frontend/sdWallet/getWalletUrl'); //撤销委托
const sdTransfer = (params) => uniRequest(params, host + '/api/frontend/sdTransfer'); //撤销委托

// 手动撮合
const newMatchMaking = (params) => uniRequest(params, host + '/api/frontend/entrust/newMatchMaking'); //手动撮合

const exchangeFoodPoint = (params) => uniRequest(params, host + '/api/frontend/exchangeFoodPoint'); //兑换

const wcPointLog = (params) => uniRequest(params, host + '/api/frontend/user/wcPointLog'); //文创积分



// 商户
const getLogo = (params) => uniRequest(params, host + '/api/frontend/logo/getLogo'); //首页图标
const getImage = (params) => uniRequest(params, host + '/api/frontend/modelImage/getImage'); //背景图


const transferWcPoint = (params) => uniRequest(params, host + '/api/frontend/user/transferWcPoint'); //文创积分转账
const lockBalanceToYsj = (params) => uniRequest(params, host + '/api/frontend/user/lockBalanceToYsj'); //零钱转账到亿数伽


//批量合成
const mergeDetail = (params) => uniRequest(params, host + '/api/frontend/product/mergeDetail'); //批量合成
const batchMerge = (params) => uniRequest(params, host + '/api/frontend/product/batchMerge'); //批量合成


//藏品销毁
const burnDetail = (params) => uniRequest(params, host + '/api/frontend/user/burnDetail'); //藏品销毁详情
const burnForCashLog = (params) => uniRequest(params, host + '/api/frontend/user/burnForCashLog'); //销毁记录
const burnForCash = (params) => uniRequest(params, host + '/api/frontend/user/burnForCash'); //销毁数量


module.exports = {
	qiniuToken,
	versionCheck,
	updateApp,
	register,
	login,
	banners,
	queueDetail,
	updateHeartbeatAt,
	pay,
	openPayType,
	info,
	changePhone,
	certification,
	changePassword,
	sendCodeSms,
	changeOperationPassword,
	feedback,
	store,
	CollectLog,
	forgetPassword,
	products,
	getabout,
	invitationCode,
	send_code_sms,
	base64,
	invitationList,
	invitationRanking,
	graphicalcode,
	cancelOrder,
	openBlindBox,
	passOnLog,
	stackingProducts,
	circulationInfo,

	productList,
	productDetail,
	productCreateOrder,
	productCollect,
	reservedApply,
	userOrders,
	userOrderDetail,
	userProductDetail,
	passOn,
	mergeLogs,
	merge,

	zixunlist,
	zixundetails,

	applyBindCard,
	unBindCard,
	bankCardList,
	confirmBindCard,
	jdConfirmPay,

	hy_bankSignPage,
	hy_confirmPay,
	hy_cancelAuth,

	release,
	goodsList,
	myReleaseList,
	myBoughtList,
	createOrder,
	cashOutRecords,
	incomeDetails,
	userWallet,
	releaseDetail,
	buyList,
	boughtDetail,
	unrelease,
	addPayment,
	delPayment,
	withdrawal,
	setPayment,
	getCommissionMoney,
	getRule,
	createRechargeOrder,

	linkedMerchantList,
	linkedMerchantDetail,
	linkedMerchantApply,
	userMerchantDetail,
	userMerchantStore,
	consignmentList,
	tokenUrl,
	cooperateApplyCommit,
	category,

	pointLog,
	pointToPointMarket,

	walletTransfer,

	zm_wallet,
	exchange,
	exchangeLog,

	entrust_list,
	entrust_commit,
	entrust_userEntrustLog,
	entrust_cancel,

	getWalletUrl,
	sdTransfer,

	newMatchMaking,

	exchangeFoodPoint,
	wcPointLog,

	getLogo,
	getImage,
  transferWcPoint,
  lockBalanceToYsj,

  batchMerge,
  mergeDetail,

  burnDetail,
  burnForCash,
  burnForCashLog,
}